package com.powersystem.demo.controller;


import com.powersystem.demo.entity.PsInspectiontaskDetail;
import com.powersystem.demo.entity.PsInspectiontaskDetail;
import com.powersystem.demo.mapper.PsInspectiontaskDetailMapper;
import com.powersystem.demo.mapper.PsInspectiontaskDetailMapper;
import com.powersystem.demo.service.IPsInspectiontaskDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author linrongji
 * @since 2019-11-14
 */
@RestController
public class PsInspectiontaskDetailController {
    @Autowired
    private IPsInspectiontaskDetailService ipidl;

    //插入一條記錄
    @RequestMapping("addPsInspectiontaskDetail")
    public boolean addPsInspectiontaskDetail(PsInspectiontaskDetail pfr){
        return ipidl.save(pfr);
    }

    // 根據ID修改是否啓動
    @RequestMapping("upPsInspectiontaskDetail")
    public boolean upPsInspectiontaskDetail(PsInspectiontaskDetail pfr){
        return ipidl.updateById(pfr);
    }

    // 根據ID刪除
    @RequestMapping("delePsInspectiontaskDetail")
    public boolean delePsInspectiontaskDetail(int id){
        return ipidl.removeById(id);
    }
}

